Default to "drive-harddisk" and then fall back to gnome-dev-harddisk
authorRodney Dawes <dobey@novell.com>
Wed, 14 Dec 2005 19:29:50 +0000 (19:29 +0000)
committerRodney Dawes <dobey@src.gnome.org>
Wed, 14 Dec 2005 19:29:50 +0000 (19:29 +0000)
2005-12-14  Rodney Dawes  <dobey@novell.com>

* gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_render_icon):
Default to "drive-harddisk" and then fall back to gnome-dev-harddisk
(get_icon_for_mime_type): Look up the mime type icons according to the
Icon Naming Specification and then fall back to the gnome-mime- prefix
for the mime type icons

Fixes #323655

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfilesystemunix.c

index fd913b6e6ee1481b36c6b56b5e34de97bd4c455f..eb48ed7dfbdf5d771a45f5367d3f052ec8e456e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-12-14  Rodney Dawes  <dobey@novell.com>
+
+       * gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_render_icon):
+       Default to "drive-harddisk" and then fall back to gnome-dev-harddisk
+       (get_icon_for_mime_type): Look up the mime type icons according to the
+       Icon Naming Specification and then fall back to the gnome-mime- prefix
+       for the mime type icons
+
+       Fixes #323655
+       
 2005-12-14  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon
index fd913b6e6ee1481b36c6b56b5e34de97bd4c455f..eb48ed7dfbdf5d771a45f5367d3f052ec8e456e6 100644 (file)
@@ -1,3 +1,13 @@
+2005-12-14  Rodney Dawes  <dobey@novell.com>
+
+       * gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_render_icon):
+       Default to "drive-harddisk" and then fall back to gnome-dev-harddisk
+       (get_icon_for_mime_type): Look up the mime type icons according to the
+       Icon Naming Specification and then fall back to the gnome-mime- prefix
+       for the mime type icons
+
+       Fixes #323655
+       
 2005-12-14  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon
index 5f078190ddbb71eead60b45b4cf0333c8be0fa09..55865201a081ae1006dbae90df5e91caa3629c4e 100644 (file)
@@ -808,6 +808,10 @@ gtk_file_system_unix_volume_render_icon (GtkFileSystem        *file_system,
 {
   GdkPixbuf *pixbuf;
 
+  pixbuf = get_cached_icon (widget, "drive-harddisk", pixel_size);
+  if (pixbuf)
+    return pixbuf;
+
   pixbuf = get_cached_icon (widget, "gnome-dev-harddisk", pixel_size);
   if (pixbuf)
     return pixbuf;
@@ -1291,6 +1295,23 @@ get_icon_for_mime_type (GtkWidget  *widget,
   if (!separator)
     return NULL; /* maybe we should return a GError with "invalid MIME-type" */
 
+  icon_name = g_string_new ("");
+  g_string_append_len (icon_name, mime_type, separator - mime_type);
+  g_string_append_c (icon_name, '-');
+  g_string_append (icon_name, separator + 1);
+  pixbuf = get_cached_icon (widget, icon_name->str, pixel_size);
+  g_string_free (icon_name, TRUE);
+  if (pixbuf)
+    return pixbuf;
+
+  icon_name = g_string_new ("");
+  g_string_append_len (icon_name, mime_type, separator - mime_type);
+  g_string_append (icon_name, "-x-generic");
+  pixbuf = get_cached_icon (widget, icon_name->str, pixel_size);
+  g_string_free (icon_name, TRUE);
+  if (pixbuf)
+    return pixbuf;
+
   icon_name = g_string_new ("gnome-mime-");
   g_string_append_len (icon_name, mime_type, separator - mime_type);
   g_string_append_c (icon_name, '-');